<?php
/**
 * Created by PhpStorm.
 * User: mr.houhai
 * Date: 2018/3/18
 * Time: 13:20
 */

namespace Xcx\Model;

use Think\Model;

class VideoModel extends Model
{

    public function getVideo()
    {
        $data =  $this->order(array('add_time'=>'desc '))->find();
        if (is_array($data) && count($data) > 0) {
            $data['url'] =  getUploadImgDir($data['url'],'video');
        }
        $Danmu = new VideoDanmuModel();
        $data['danmu_list'] = $Danmu->getDanmuList($data['id']);
        return $data;
    }

}